<table class="list" cellpadding="0" cellspacing="0">
	<thead>
		<td>id</td>
		<td>&nbsp;</td>
		<td>说明</td>
		<td>app</td>
		<td>controller</td>
		<td>action</td>
		
	</thead>
	<? foreach($this->ret['data']['resources'] as $i=>$row):?>
	<? 
	if($i!=0 and $row['app']!=$this->ret['data']['resources'][$i-1]['app']){
		$app_diff = true;
	}else{
		$app_diff = false;
	}
	if($i==0){
		$controllerCss = 0;
	}elseif($row['app']==$this->ret['data']['resources'][$i-1]['app']){
		if($row['controller']!=$this->ret['data']['resources'][$i-1]['controller']){
			$controllerCss++;
		}
	}else{
		$controllerCss = 0;
	}
	?>

	<tr class="<?= $app_diff?'app':''?> controller_<?= $controllerCss?>">
		<td><?= $row['id']?></td>
		<td>		
		<input type='checkbox' name="resource_id[]" value='<?= $row['id']?>' <?= in_array($row['app']."_".$row['controller']."_".$row['action'], $this->ret['data']['priv'])?'checked':''?>>
		</td>
		<td><?= $row['description']?></td>
		<td><?= $row['app']?></td>
		<td><?= $row['controller']?></td>
		<td><?= $row['action']?></td>
	</tr>
	<? endforeach;?>
</table>